package leetcode.array;

import leetcode.array.common.ArrayUtils;

import java.util.List;

class Solution315 {
    public List<Integer> countSmaller(int[] nums) {
        // 暴力求解,超时
//        return ArrayUtils.countSmaller(nums);
        // 树状数组
        return ArrayUtils.countSmallerPro(nums);
    }
}

public class leetcode315 {
    public static void main(String[] args) {
        Solution315 solution315 = new Solution315();
        int[] nums = {5, 2, 6, 1};
        int[] nums1 = {2, 0, 1};
        System.out.println(solution315.countSmaller(nums));
        System.out.println(solution315.countSmaller(nums1));
    }
}
